<?php

CVarDumper::dump($model->tabuleiro);
echo count($model->tabuleiro);
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'tabuleiro-grid',
    'dataProvider' => $model->search(),
    //'filter' => $model,
    'columns' => array(
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.id', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->id', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.descricao', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->descricao', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.num_alveolos', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->num_alveolos', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.cubicagem', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->cubicagem', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.comprimento', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->comprimento', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'tabuleiro.largura', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->tabuleiro[0]->largura', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
//        'cubicagem',
//        'comprimento',
//        'largura',
//        'active',
//        'created_at',
//        'updated_at',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>

